<!-- main -->
<div class="row">
    <div class="col-sm-12">
        <div class="box box-primary">
            <div class="table-scroll-content">
                <table class="table table-bordered table-hover table-striped table-keep-line">
                    <thead>
                        <tr>
                            <th>年级</th>
                            <th>专业</th>
                            <th>学号</th>
                            <th>姓名</th>
                            <th>选题状态</th>
                            <th>题目</th>
                            <th>任务书</th>
                            <th>查阅状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr *ngFor="let student of Students">
                            <td>{{student.StudentGrade}}</td>
                            <td>{{student.StudentMajor}}</td>
                            <td>{{student.StudentId}}</td>
                            <td><a (click)="showStudent(student)">{{student.StudentName}}</a></td>
                            <td>
                                <span *ngIf="student.SelectStatus==0 || student.Level==null" style="color:gray">未选题</span>
                                <span *ngIf="student.SelectStatus==1" style="color:#FF7B00">待确认</span>
                                <span *ngIf="student.SelectStatus==2" style="color:green">已选题</span>
                            </td>
                            <td>{{student.TitleName}}</td>
                            <td><button class="btn btn-primary btn-xs" (click)="getTask(student)">查看</button></td>
                            <td>
                                <span *ngIf="student.ReadStatus==0 || student.ReadStatus==null" style="color:red">未查阅</span>
                                <span *ngIf="student.ReadStatus==1" style="color:green">已查阅</span>
                            </td>
                            <td>
                                <button class="btn btn-xs btn-primary" (click)="editStudent(student)">编辑</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<!-- 详情模版 -->
<div class="modal fade" id="studentModel" tabindex="-1" role="dialog" aria-labelledby="信息">
    <div class="modal-dialog" role="document">
        <div class="modal-content col-sm-12">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4>学生信息</h4>
            </div>
            <div class="modal-body">
                <div><strong>年级：</strong>{{studentInfo.StudentGrade}}</div>
                <div><strong>系别：</strong>{{studentInfo.StudentDepartment}}</div>
                <div><strong>专业：</strong>{{studentInfo.StudentMajor}}</div>
                <div><strong>学号：</strong>{{studentInfo.StudentId}}</div>
                <div><strong>姓名：</strong>{{studentInfo.StudentName}}</div>
                <div><strong>性别：</strong>{{studentInfo.StudentSex}}</div>
                <div><strong>电话：</strong>{{studentInfo.StudentNumber}}</div>
                <div><strong>邮箱：</strong>{{studentInfo.StudentEmail}}</div>
            </div>
        </div>
    </div>
</div>

<!-- 详情模版 -->
<div class="modal fade" id="TaskModel" tabindex="-1" role="dialog" aria-labelledby="详情">
    <div class="modal-dialog" role="document">
        <div class="modal-content col-sm-12">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">任务书</h4>
            </div>
            <div class="modal-body">
                <h3>一、题目来源及原始数据资料</h3>
                <p>{{taskModel.DesignSummary}}</p>

                <h3>二、毕业设计要求</h3>
                <h4>1、设计内容:</h4>
                <p>{{taskModel.DesignContent}}</p>

                <h4>2、研究内容:</h4>
                <p>{{taskModel.ResearchContent}}</p>

                <h4>3、实现功能:</h4>
                <p>移动端:{{taskModel.FunctionForPC}}</p>
                <p>WEB端:{{taskModel.FunctionForMobile}}</p>

                <h4>4、后期任务:</h4>
                <p>{{taskModel.LaterTask}}</p>

                <h4>5、最终提交:</h4>
                <p>{{taskModel.LastSumbit}}</p>

                <h3>三、进度安排、应完成的工作量</h3>
                <h4>1、系统需求分析：</h4>
                <p>{{taskModel.SystemAnalysis}}</p>

                <h4>2、系统设计：</h4>
                <p>{{taskModel.SystemDesign}}</p>

                <h4>3、技术准备：</h4>
                <p>{{taskModel.SkillReady}}</p>

                <h4>4、软件设计：</h4>
                <p>{{taskModel.SoftwareDesign}}</p>

                <h4>5、软件开发编程：</h4>
                <p>{{taskModel.SoftwareDevelop}}</p>

                <h4>6、软件程序测试：</h4>
                <p>{{taskModel.SoftwareTest}}</p>

                <h4>7、毕业论文撰写：</h4>
                <p>{{taskModel.TitleWrite}}</p>

                <h4>8、毕业论文（设计）成品初稿提交：</h4>
                <p>{{taskModel.TitleFristSumbit}}</p>

                <h4>9、毕业论文（设计）修改：</h4>
                <p>{{taskModel.TitleEdit}}</p>

                <h4>10、毕业论文（设计）答辩：</h4>
                <p>{{taskModel.TitleAnswer}}</p>

                <h4>11、毕业论文（设计）成品终稿提交：</h4>
                <p>{{taskModel.TitleLastSumbit}}</p>

                <h3>四、主要参考文献</h3>
                <p>{{taskModel.Reference}}</p>
            </div>
        </div>
    </div>
</div>

<!-- 编辑模版 -->
<div class="modal fade" id="editModel" tabindex="-2" role="dialog" aria-labelledby="编辑">
    <div class="modal-dialog" role="document">
        <div class="modal-content col-sm-12">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">编辑</h4>
            </div>
            <div class="modal-body">
                <form class="form-inline" #editForm="ngForm">
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentGrade">年级</label>
                        <input type="text" class="form-control" id="EstudentGrade" placeholder="学生年级" required [(ngModel)]="editStudentModel.StudentGrade"
                            name="EstudentGrade">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentDepartment">系别</label>
                        <input type="text" class="form-control" id="EstudentDepartment" placeholder="学生系别" required [(ngModel)]="editStudentModel.StudentDepartment"
                            name="EstudentDepartment">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentMajor">专业</label>
                        <input type="text" class="form-control" id="EstudentMajor" placeholder="学生专业" required [(ngModel)]="editStudentModel.StudentMajor"
                            name="EstudentMajor">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentId">学号</label>
                        <input type="text" class="form-control" id="EstudentId" placeholder="学生学号" required [(ngModel)]="editStudentModel.StudentId"
                            name="EstudentId">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentName">姓名</label>
                        <input type="text" class="form-control" id="EstudentName" placeholder="学生姓名" required [(ngModel)]="editStudentModel.StudentName"
                            name="EstudentName">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentSex">性别</label>
                        <input type="text" class="form-control" id="EstudentSex" placeholder="学生性别" required [(ngModel)]="editStudentModel.StudentSex"
                            name="EstudentSex">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentNumber">电话</label>
                        <input type="text" class="form-control" id="EstudentNumber" placeholder="学生电话" [(ngModel)]="editStudentModel.StudentNumber"
                            name="EstudentNumber">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EstudentEmail">邮箱</label>
                        <input type="text" class="form-control" id="EstudentEmail" placeholder="学生邮箱" [(ngModel)]="editStudentModel.StudentEmail"
                            name="EstudentEmail">
                    </div>
                    <!-- <div class="form-group edit-input col-sm-6">
                        <label for="EteacherId">导师工号</label>
                        <input type="text" class="form-control" id="EteacherId" placeholder="导师工号" [(ngModel)]="editStudentModel.TeacherId" name="EteacherId">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EteacherName">导师姓名</label>
                        <input type="text" class="form-control" id="EteacherName" placeholder="导师姓名" [(ngModel)]="editStudentModel.TeacherName" name="EteacherName">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EteacherSex">导师性别</label>
                        <input type="text" class="form-control" id="EteacherSex" placeholder="导师性别" [(ngModel)]="editStudentModel.TeacherSex" name="EteacherSex">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EteacherDepartment">导师系别</label>
                        <input type="text" class="form-control" id="EteacherDepartment" placeholder="导师系别" [(ngModel)]="editStudentModel.TeacherDepartment"
                            name="EteacherDepartment">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EteacherNumber">导师电话</label>
                        <input type="text" class="form-control" id="EteacherNumber" placeholder="导师电话" [(ngModel)]="editStudentModel.TeacherNumber"
                            name="EteacherNumber">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EteacherEmail">导师邮箱</label>
                        <input type="text" class="form-control" id="EteacherEmail" placeholder="导师邮箱" [(ngModel)]="editStudentModel.TeacherEmail"
                            name="EteacherEmail">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EselectStatus">选题状态</label>
                        <select class="form-control" id="EselectStatus" [(ngModel)]="editStudentModel.SelectStatus" name="EselectStatus" placeholder="选题状态">
                            <option value="0">未选题</option>
                            <option value="1">待确认</option>
                            <option value="2">已选题</option>
                        </select>
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EtitleId">编号</label>
                        <input type="text" class="form-control" id="EtitleId" placeholder="题目编号" [(ngModel)]="editStudentModel.TitleId" name="EtitleId">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EtitleName">题目</label>
                        <input type="text" class="form-control" id="EtitleName" placeholder="论文题目" [(ngModel)]="editStudentModel.TitleName" name="EtitleName">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EkeyWord">关键字</label>
                        <input type="text" class="form-control" id="EkeyWord" placeholder="关键字" [(ngModel)]="editStudentModel.KeyWord" name="EkeyWord">
                    </div> -->
                    <div class="form-group edit-input col-sm-6">
                        <label for="EsystemScore">系统得分</label>
                        <input type="text" class="form-control" id="EsystemScore" placeholder="系统得分" [(ngModel)]="editStudentModel.SystemScore" name="EsystemScore">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EtitleScore">论文得分</label>
                        <input type="text" class="form-control" id="EtitleScore" placeholder="论文得分" [(ngModel)]="editStudentModel.TitleScore" name="EtitleScore">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="Escore">总分</label>
                        <input type="text" class="form-control" id="Escore" placeholder="总分" [(ngModel)]="editStudentModel.Score" name="Escore">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="EreadStatus">查阅状态</label>
                        <select class="form-control" id="EreadStatus" [(ngModel)]="editStudentModel.ReadStatus" name="EreadStatus" placeholder="查阅状态">
                            <option value="0">未查阅</option>
                            <option value="1">已查阅</option>
                        </select>
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="Egraduation">毕业年份</label>
                        <input type="text" class="form-control" id="Egraduation" placeholder="毕业年份" [(ngModel)]="editStudentModel.Graduation" name="Egraduation">
                    </div>
                    <div class="form-group edit-input col-sm-6">
                        <label for="Elevel">评级</label>
                        <select class="form-control" id="Elevel" [(ngModel)]="editStudentModel.Level" name="Elevel" placeholder="评级">
                            <option value="0">未评级</option>
                            <option value="1">不合格</option>
                            <option value="2">合格</option>
                            <option value="3">优秀</option>
                        </select>
                    </div>
                </form>
            </div>
            <div class="modal-footer col-sm-12">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="submit" class="btn btn-primary" (click)="saveStudent()" [disabled]="!editForm.form.valid">确认</button>
            </div>
        </div>
    </div>
</div>